#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main()
{
	int* ip = NULL;
	int i = 0;
	while (1)
	{
		ip = (int*)malloc(sizeof(int) * 1024 * 1024); //1M;
		//if (NULL == ip) break;
		++i;
	}
	printf("heap size: %d \n", i);
	return 0;
}